<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>背景资源管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/source/background/eleSourceBackground/"><spring:message code='source.background.list'/></a></li>
		<shiro:hasPermission name="source:background:eleSourceBackground:edit"><li><a href="${ctx}/source/background/eleSourceBackground/form"><spring:message code='source.background.add'/></a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="eleSourceBackground" action="${ctx}/source/background/eleSourceBackground/list" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label><spring:message code="common.dname"/>：</label>
				<form:input path="name" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="<spring:message code='common.Query'/>"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed" >
		<thead>
			<tr>
				<th><spring:message code='source.background.name'/></th>
				<th><spring:message code='background.color'/></th>
				<th><spring:message code='source.background.picture'/></th>
				<th><spring:message code='source.background.gif'/></th>
				<th><spring:message code='common.update_time'/></th>
				<th><spring:message code='common.remarks'/></th>
				<shiro:hasPermission name="source:background:eleSourceBackground:edit"><th><spring:message code='common.operation'/></th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="eleSourceBackground">
			<tr>
				<td>
					<a href="${ctx}/source/background/eleSourceBackground/form?id=${eleSourceBackground.id}">
						${eleSourceBackground.name}
					</a>
				</td>
				<td>
					<a href="${ctx}/source/background/eleSourceBackground/form?id=${eleSourceBackground.id}">
						<span title="${eleSourceBackground.color}"
							  style="display: block;width: 80px;height: 30px;
									  border: 1px solid;
									  background-color: ${fns:getColor(eleSourceBackground.color)};"></span>
					</a>
				</td>
				<td  style="background-color:#B5b5b5">
					<img src="${fn:replace(eleSourceBackground.bgImage, "|", "")}" style="height: 40px;">
				</td>
				<td style="background-color:#B5b5b5">
					<img src="${fn:replace(eleSourceBackground.bgGif, "|", "")}" style="height: 40px;">
				</td>
				<td>
					<fmt:formatDate value="${eleSourceBackground.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${eleSourceBackground.remarks}
				</td>
                    <td>
                        <shiro:hasPermission name="source:background:eleSourceBackground:edit">
                            <a href="${ctx}/source/background/eleSourceBackground/form?id=${eleSourceBackground.id}"><spring:message code="common.modify"/></a>
                            <a href="${ctx}/source/background/eleSourceBackground/delete?id=${eleSourceBackground.id}" onclick="return confirmx('<spring:message code='tips.delbackground' />', this.href)"><spring:message code='common.delete'/></a>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="source:background:eleSourceBackground:check">
                            <a href="${ctx}/source/background/eleSourceBackground/check?id=${eleSourceBackground.id}">审核</a>
                        </shiro:hasPermission>
                    </td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>